import type {ReactNode} from "react";
import type {Rule} from "antd/es/form";
export interface ReducerActionType {
    type: string
    payload?: object
}

export type PropsType = {
    children: ReactNode
}

export type ContextType<T = object> = {
    state: T
    dispatch: (data: ReducerActionType) => void
}

export type FormRules<T = object> = {
    [key in keyof T]: Rule[]
}

// 分页查询接口
export type PageQueryType<T = object> = {
    page: number
    pageSize: number
    data: T
}

export type PageResType<T = object> = {
    total: number
    page: number
    pageSize: number
    list: T[]
}